package com.xnfh.common.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

/**
 * @Description:
 * @Author: ziheng
 * @CreateDate: 2023/12/15 14:43
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/12/15 14:43
 * @UpdateRemark: 更新说明
 */
class MyPageAdapter(fm: FragmentManager, private var mFragment: List<Fragment>, private var mTitle: List<String>): FragmentPagerAdapter(fm) {
    override fun getCount(): Int {
        return mFragment.size
    }

    override fun getPageTitle(position: Int): CharSequence {
        return mTitle[position]
    }

    override fun getItem(position: Int): Fragment {
        return mFragment[position]
    }
}